package com.rt.cms.dao.system;

import com.rt.cms.data.entity.system.User;
import com.rt.cms.data.entity.system.UserExample;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserDao {

    long countByExample(UserExample example);

    int deleteByExample(UserExample example);

    int deleteByPrimaryKey(Long id);

    int insert(User record);

    int insertSelective(User record);

    List<User> selectByExample(UserExample example);

    User selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example);

    int updateByExample(@Param("record") User record, @Param("example") UserExample example);

    int updateByPrimaryKeySelective(User record);

    int updatePass(User record);

    List<User> selectAllLeader();

    List<User> selectGroupLeaderByGId(@Param("organizationId") Long organizationId);

    List<User> selectAllUserBypId(@Param("pId") Integer pId);

    List<User> selectByUserType(UserExample example);

    String queryRiskPhoneByRole();

    String queryPhoneById(@Param("id")int id);

    String queryParentPhoneById(@Param("id")int id);

}